home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_05
/
allison
/
share.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-23
|
286b
|
17 lines
LISTING 12 - Shows that tags and variables share the same
namespace
#include <iostream.h>
struct pair {int x; int y;};
main()
{
int pair = 0;
pair p = {pair,pair}; // error
cout << pair << endl;
cout << p.x << ',' << p.y << endl;
return 0;
}